$.extend({
    changeNav: function (topNav) {
        $("#n-list").children().removeClass("active").end().find(".n-" + topNav).addClass("active");
    },
    getUrlParam: function (name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
        if (r != null) return unescape(r[2]);
        return null; //返回参数值
    },
});
$.fn.extend({
    serializeObject: function () {
        debugger;
        let _this = this;
        let obj = new Object();
        $.each(_this.serializeArray(), function (index, param) {
            if (!(param.name in obj)) {
                obj[param.name] = param.value;
            }
        });
        for (let k in obj) {
            if (obj[k] == "") {
                delete obj[k];
            }
        }
        return obj;
    }
})